﻿namespace Gum.FizzBuzz
{
    /// <summary>
    /// Defines a FizzBuzz Job, consisting of a range start and end and a method
    /// to transform an integer input into a string to output
    /// </summary>
    public interface IFizzBuzzJob
    {
        /// <summary>
        /// The starting value of the FizzBuzz range to process
        /// </summary>
        /// <remarks>
        /// If Start value is greater than end value, job counts down
        /// </remarks>
        int Start { get; set; } 

        /// <summary>
        /// The ending value of the FizzBuzz range to process
        /// </summary>
        /// <remarks>
        /// If End value is less than start value, job counts down
        /// </remarks>
        int End { get; set; }

        /// <summary>
        /// Transforms an integer input into a string output
        /// </summary>
        /// <param name="value">the integer value to transform</param>
        /// <returns>the transformed value</returns>
        /// <remarks>
        /// The traditional FizzBuzz algorithm would transform as follows:
        /// value % 3 and value % 5 -> "FizzBuzz"
        ///   else
        /// value % 3 -> "Fizz"
        ///   else
        /// value % 5 -> "Buzz"
        ///   else
        /// value as string
        /// </remarks>
        string Transform(int value);
    }
}